﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="QuerySelectionLabelingTool.Admin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 10px;
        }
        .style5
        {
            height: 9px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSourcePingBingState" Height="30px" 
        Width="690px">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="Task ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" >
            <ItemStyle HorizontalAlign="Center" Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="name" HeaderText="Task Name" SortExpression="name" >
            <ItemStyle HorizontalAlign="Center" Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="createTime" HeaderText="Task Create Time" 
                SortExpression="createTime" >
            <ItemStyle HorizontalAlign="Center" Width="100px" />
            </asp:BoundField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" 
                        CommandArgument='<%# Eval("ID") %>' CommandName="PingBing" 
                        onclick="LinkButton1_Click" 
                        onclientclick="javascript:return confirm('Are you sure?')" Text="Cancel"></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <table border="1" rules="all" 
                style="border-style: groove; width: 100%; height: 50px;">
                <tr>
                    <td align="center" class="style5" style="font-weight: bold">
                        TaskID</td>
                    <td align="center" class="style5" style="font-weight: bold">
                        Task Name</td>
                    <td align="center" class="style5" style="font-weight: bold">
                        Task Create Time</td>
                </tr>
                <tr>
                    <td align="center" colspan="3">
                        No Task</td>
                </tr>
            </table>
        </EmptyDataTemplate>
    </asp:GridView>
    <br />
    <asp:SqlDataSource ID="SqlDataSourcePingBingState" runat="server" 
        ConnectionString="<%$ ConnectionStrings:QuerySelectionLabelingToolConnectionString %>" 
        SelectCommand="SELECT tb_task.ID, tb_task.name, tb_task.createTime FROM tb_task INNER JOIN tb_taskIDQueue ON tb_task.ID = tb_taskIDQueue.taskID">
    </asp:SqlDataSource>
</asp:Content>
